package com.wesley.command;


/**
 * <h1>概述</h1>
 * <p>详述</p>
 *
 * @Date: 2021/8/31
 */
public class CommandClient {
    public static void main(String[] args) {

        LightReceive lightReceive = new LightReceive();

        LightOnCommand onCommand = new LightOnCommand(lightReceive);
        LightOffCommand offCommand = new LightOffCommand(lightReceive);

        // 遥控器
        RemoteController remoteController = new RemoteController();
        // 第一组开关， 电灯
        remoteController.setCommand(0, onCommand, offCommand);

        System.out.println("按下电灯ON开关...");
        remoteController.touchOn(0);

    }
}
